# coding=utf8


def sort_1(list_base):
    """
    冒泡排序
    :return:
    """
    if not isinstance(list_base, list):
        return
    while True:
        need_break = True
        for i in range(len(list_base)):
            if i + 1 == len(list_base):
                break
            temp = list_base[i]
            if temp > list_base[i + 1]:
                need_break = False
                list_base[i] = list_base[i + 1]
                list_base[i + 1] = temp
        if need_break:
            break
    return list_base


if __name__ == "__main__":
    l1 = [1, 2, 3, 52, 11, 3, 2, 9, 223, 9, 912, 38]
    print(sort_1(l1))
